package com.itheima.day06;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;

public class Demo3 {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        map.put("zs",12);

        Set<String> keys = map.keySet();
        for (String key : keys) {
            Integer integer = map.get(key);

        }

        Set<Map.Entry<String, Integer>> entries = map.entrySet();
        for (Map.Entry<String, Integer> entry : entries) {
            entry.getKey();
            entry.getValue();
        }

        map.forEach((s, integer) -> System.out.println());

        Integer[] arr={1,2,3};
        Arrays.sort(arr,(o1,o2)->o2-o1);
        System.out.println(Arrays.toString(arr));
    }
}
